<?php

namespace app\common\model\user;

use think\Model;


class Viptype extends Model
{


    // 表名
    protected $table = 'user_vip_type';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    public function isAllowList()
    {
        return [1 => '是', 0 => '否'];
    }


    public function lists()
    {
        return $this->hasMany('Viplists', 'type_id')->field("createtime,updatetime,deletetime", true);
    }
}
